die

 

Die is used by turtles and links. When a turtle or link is asked to die, it no longer exists in the model, will not execute any more code, and will disappear from any agentset it was in. For example, if count turtles returned 10, then ask one-of turtles [die] was called, now count turtles would return 9.

 

Try it Yourself

 
 
 
 
 
 
 

What's next?

Once you mastered the die primitive, don't stop there. Check out the resources below to improve your NetLogo skills.

 
Published NetLogo models that use the die primitive:
 
 
Similar primitives:
hatch

Creates turtles from an existing turtle.

Read more
sprout

Create new turtles from a patch.

Read more
create-turtles

creates turtles with random colors and headings in the default shape of a turtle

Read more
create-links-with

creates links with every agent in an agentset

Read more
 
Learn another primitive